package com.hrbxlh.virtualization.util;


import java.util.HashMap;
import java.util.Map;

/**
 * 方便创建简单返回的vo
 *
 * @author cheer
 */
public class ObjectUtil {

    private Map<String, Object> objectMap;

    private ObjectUtil(Map<String, Object> objectMap) {
        this.objectMap = objectMap;
    }

    public static ObjectUtil build(){
        Map<String, Object> object = new HashMap<>();
        return new ObjectUtil(object);
    }

    public ObjectUtil addObject(String key,Object value){
        objectMap.put(key,value);
        return this;
    }

    public Map<String,Object> map(){
        return this.objectMap;
    }
}
